#coding: utf-8
#create: toontong
#date:   2009-06-28

from google.appengine.ext import db

class Template(db.Model):
    #user_email = db.StringProperty(required = True)  #所属用户email
    owner = db.UserProperty(required=True)
    temp_name   = db.StringProperty(required = True) #模版名称
    reply_tomail = db.StringProperty(required = True)#默认回复邮箱
    send_myself = db.BooleanProperty()               #是否发送给自己
    mail_list   = db.TextProperty()                  #收件人列表  
    marco       = db.TextProperty()                  #自定义 的宏    
    glogin_mail = db.StringProperty()                #google表格登录用邮箱帐号
    gfile_name  = db.StringProperty()                #文件表
    gwksht_name = db.StringProperty()                #表名
    title       = db.TextProperty(required = True)     #邮件标题
    mail_context = db.TextProperty(required = True)  #邮件内容，html文本

class Job(db.Model):
    '''GAE 上不支持定时 '''
    smtp_server = db.StringProperty(required = True)
    login_user  = db.StringProperty(required = True)
    login_psw   = db.StringProperty(required = False)
    sender_mail = db.StringProperty(required = True)
    mail_list   = db.TextProperty()
    marco       = db.TextProperty()
    subject     = db.TextProperty()
    mail_context = db.TextProperty()
    send_myself = db.BooleanProperty()
    

    glogin_mail = db.StringProperty(required=True) 
    gfile_name  = db.StringProperty(required=True) 
    gwksht_name = db.StringProperty(required=True)
   
    
    attach_file_path = db.StringProperty(required=True)
    gpassword = db.StringProperty(required=True)
    main_index = db.StringProperty(required=True) 
    
    
    